package com.jobsika.client.rpc;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.jobsika.domain.RPCPost;
import com.jobsika.domain.RPCUser;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface UserServiceAsync {
	public void login(String requestUri, AsyncCallback<RPCUser> async);
	public void register(RPCUser user, AsyncCallback<RPCUser> async);
	public void getUsers(int page, int limit, AsyncCallback<RPCUser[]> callback);
	public void getPosts(int page, int limit, AsyncCallback<RPCPost[]> callback);
	public void search(int page, int limit, String key, AsyncCallback<RPCPost[]> callback);
	public void getPost(String key, AsyncCallback<RPCPost> callback);
	public void getUser(String email, AsyncCallback<RPCUser> callback);
	public void initialize(AsyncCallback<Integer> callback);
}
